/*

package com.smm.controller;

import io.jsonwebtoken.ExpiredJwtException;
import org.apache.shiro.authz.AuthorizationException;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class BaseExceptionHandler {

    @ExceptionHandler(value = AuthorizationException.class)
    @ResponseBody
    public ResponseEntity authorizationException() {
        return new ResponseEntity("<h1>用户未认证<h1>", HttpStatus.UNAUTHORIZED);
    }

    @ExceptionHandler(value = ExpiredJwtException.class)
    @ResponseBody
    public ResponseEntity expiredJwtException() {
        return new ResponseEntity("token过期", HttpStatus.UNAUTHORIZED);
    }

    @ExceptionHandler(value = Exception.class)
    @ResponseBody
    public ResponseEntity error() {
        return new ResponseEntity("服务器内部错误", HttpStatus.INTERNAL_SERVER_ERROR);
    }
}

*/
